﻿using OpenQA.Selenium;
using OpenQA.Selenium.IE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SeleniumExtension.WebDriver
{
    public sealed class InternetExplorer
    {
        private static volatile IWebDriver instance;
        private static object syncRoot = new object();

        private InternetExplorer() { }

        public static IWebDriver Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (syncRoot)
                    {
                        if (instance == null)
                            instance = new InternetExplorerDriver(new InternetExplorerOptions() { IntroduceInstabilityByIgnoringProtectedModeSettings = true });
                    }
                }
                return instance;
            }
        }
    }
}
